<%--
  Created by IntelliJ IDEA.
  User: 陈奕安
  Date: 2025/5/27
  Time: 9:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>产生随机数</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    int counter=0;
    session.setAttribute("counter",counter);
    int ranNum=(int)Math.random()*100;
    session.setAttribute("ranNum",ranNum);
%>
随机给你个0-99之间的数，猜猜看<br/>
输入你猜的数字：
<form action="doInput.jsp" method="post">
    <input type="text" name="numTxt">
    <input type="submit" name="cya" value="提交">
</form>

</body>
</html>
